//
//  SPSetupViewController.m
//  Sport
//
//  Created by Cass on 2017/12/2.
//  Copyright © 2017年 Cass. All rights reserved.
//

#import "SPSetupViewController.h"
#import "SPIDViewController.h"
#import "SPAcceptViewController.h"
@interface SPSetupViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@end

@implementation SPSetupViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
}

#pragma mark - UITableViewDelegate -
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
//    if (indexPath.row == 0) {
//        SPIDViewController *IDVC = [[UIStoryboard storyboardWithName:@"Mine" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:NSStringFromClass([SPIDViewController class])];
//        IDVC.title = @"账户绑定";
//        [self.navigationController pushViewController:IDVC animated:YES];
//    }else
        if (indexPath.row == 0){
        SPAcceptViewController *acceptVC = [[UIStoryboard storyboardWithName:@"Mine" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:NSStringFromClass([SPAcceptViewController class])];
        acceptVC.title = @"通知";
        [self.navigationController pushViewController:acceptVC animated:YES];
    }
}

#pragma mark - UITableViewDataSource -
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 2;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *ID = @"cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
//    if (indexPath.row == 0) {
//        cell.textLabel.text = @"账户绑定";
//    }else
        if (indexPath.row == 0){
        cell.textLabel.text = @"通知";
    }else{
        cell.textLabel.text = @"清除缓存";
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 10.0f;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
   
}



@end
